package com.xywy.bloodandroid.util;

import java.util.Calendar;

public class MyDateUtils {
	/**
	 * 展示当前是哪天 格式是：今天是x月x日 星期x
	 */
	public static String currentDay() {
		Calendar calendar = Calendar.getInstance();
		calendar.setTimeInMillis(System.currentTimeMillis());
		int month = 0; // 月。
		if (calendar.get(Calendar.MONTH) > 11) {
			month = 1;
		} else {
			month = calendar.get(Calendar.MONTH) + 1;
		}
		int day_of_month = calendar.get(Calendar.DATE);
		int day_of_week = 0;
		if (calendar.get(Calendar.DAY_OF_WEEK) > 1) {
			day_of_week = calendar.get(Calendar.DAY_OF_WEEK) - 1;
		} else {
			day_of_week = 7;
		}
		return "今天是" + month + "月" + day_of_month + "日   星期" + day_of_week;
	}
}
